package cn.tedu.csmall.product.exception;

import cn.tedu.csmall.product.web.ServiceCode;
import lombok.Getter;

import java.io.Serial;

/**
 * 业务异常
 *
 * @author Chen
 */
@Getter
public class ServiceException extends RuntimeException {

    @Serial
    private static final long serialVersionUID = -5829313584392389869L;

    /**
     * 业务异常编码
     */
    private final ServiceCode serviceCode;

    public ServiceException(ServiceCode serviceCode, String message) {
        super(message);
        this.serviceCode = serviceCode;
    }

}
